{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">
				<ul class="breadcrumb">
					<li>
						<i class="glyphicon glyphicon-home"></i>
						<span>当前位置：</span>
						<a href="#">{$breadcrumb[0]}</a>
						<i class="glyphicon glyphicon-chevron-right"></i>
						<a href="#">{$breadcrumb[1]}</a>
					</li>
				</ul>

				<!-- Nav tabs -->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					<li class="active"><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加菜单</a></li>
					<li><a href="{$index_url}"><i class="glyphicon glyphicon-th-list"></i> 菜单列表</a></li>
					<li><a href="javascript:void(0);"><i class="glyphicon glyphicon-edit"></i> 编辑菜单</a></li>
				</ul>

				<div class="inner-container">

					<form role="form" class="content-add-form" id="content-add-form" autocomplete="off">

						<div class="form-element">
							<div class="form-group">
								<label><span class="asterisk">*</span>  上级菜单</label>
								<select class="form-control" name="data[pid]" required>
									<option value="0">顶级菜单</option>
									{loop $menus $menu}
									<option value="{$menu[id]}">{$menu[name]}</option>
									{/loop}
								</select>
							</div>
							<p class="help-block"></p>
						</div>

						<div class="form-element">
							<div class="form-group">
								<label><span class="asterisk">*</span> 菜单名称</label>
								<input type="text" name="data[name]" class="form-control" maxlength="30" placeholder="菜单名称" required />
							</div>
							<p class="help-block">最大长度为30个字符或者汉字</p>
						</div>

						<div class="form-element">
							<div class="form-group">
								<label><span class="asterisk">*</span> 菜单URL</label>
								<input type="text" name="data[url]" class="form-control" value="#" placeholder="菜单URL" required />
							</div>
							<p class="help-block">顶级菜单使用#替代URL</p>
						</div>

						<div class="form-element">
							<div class="form-group">
								<label><span class="asterisk">*</span>  显示状态</label>
								<div>
									<input type="checkbox" class="bswitch bswitch-add" checked data-on-text="显示" data-off-text="隐藏">
									<input type="hidden" name="data[ishow]" value="1">
								</div>
							</div>
							<p class="help-block">被隐藏的菜单将不会在左侧菜单栏显示</p>
						</div>

						<div class="btn-group btn-group-or">
							<a href="{$insert_url}" class="btn btn-primary" id="submit_btn"
							   proxy='{"method":"post", "location":"{$index_url}"}'>提交保存</a>
							<span class="or">OR</span>
							<button type="reset" class="btn btn-default">重置表单</button>
						</div>
					</form>

				</div>
			</div><!-- end of inner -->

		</section>

	</div>
</div>

{include admin.inc.footer}

<script>
	seajs.use("managerMenu", function(exports) {
		exports.init({});
	});
</script>
</body>
</html>
